|
DX11 LOAD FONT
Creates a bitmap font from the specified font sheet (image) file.
By default the font will not be monospaced. To achieve this any transparent pixels around the individual
character cells are trimmed away. For this reason the width of a space character has to be explicitly stated
as opposed to being read as an empty cell from the font sheet.
The font is set up to correspond to normal 8-bit ASCII characters.
NOTE: the across / down arguments are the splits assuming the font sheet spans from character 0!
This means that if you have a font sheet that contains 16x14 characters and begins at character 32 (space), you
would specify the splits as 16x16 since that is what it would be if the sheet started at character 0. All characters
preceding the provided firstCharacter are ignored during setup though.
Return Dword = DX11 LOAD FONT(fontSheetFileName, firstCharacter, across, down, spaceWidth, [monoSpace])
fontSheetFileName String The file name of the font sheet image to use.
firstCharacter Dword The ascii value of the first character present on the font sheet.
across Dword The horizontal splits of the font sheet.
down Dword The vertical splits of the font sheet.
spaceWidth Dword The width (in pixels) of the space character. The tab interval is currently hardcoded to 4x the space width.
[Optional] monoSpace Boolean If set to true the font will be considered as being monospaced (all characters will have the same width). Defaults to false.
The created bitmap font.
FONT Functions Menu
DX11 Function Categories
|